/* 全局样式 */
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: rgba(0, 0, 0, 0.85);
  font-size: 14px;
  line-height: 1.5715;
  background-color: #f0f2f5;
  height: 100%;
}

#root {
  height: 100vh;
}

* {
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
  outline: none;
  cursor: pointer;
  transition: color 0.3s;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: rgba(0, 0, 0, 0.85);
  font-weight: 500;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
}

img {
  vertical-align: middle;
  border-style: none;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

// 清除浮动
.clearfix {
  zoom: 1;
  &::before,
  &::after {
    display: table;
    content: '';
  }
  &::after {
    clear: both;
  }
}

// 文本溢出显示省略号
.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

// 多行文本溢出显示省略号
.text-ellipsis-multi-line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

// 居中布局
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

// 垂直居中
.flex-center-vertical {
  display: flex;
  align-items: center;
}

// 水平居中
.flex-center-horizontal {
  display: flex;
  justify-content: center;
}

// 两端对齐
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

// 页面容器
.page-container {
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  margin: 24px;
  min-height: calc(100vh - 112px);
}

// 页面标题
.page-title {
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
}

// 卡片容器
.card-container {
  margin-bottom: 16px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

// 表单容器
.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

// 操作栏
.action-bar {
  margin-bottom: 16px;
  text-align: right;
  button + button {
    margin-left: 8px;
  }
}

// 表格操作列
.table-actions {
  button + button {
    margin-left: 8px;
  }
}

// 响应式工具类
@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hidden-desktop {
    display: none !important;
  }
}
